/**
 * 保存前置等待编号生成
 */
function main() {
    const self = this;
    let flag = false;
    return new Promise((resolve, reject) => {
        self.$$("tree_single_select_551mpk").onChange();
        debugger
        let stallOrganizationCodeEle = self.$$("text_input_37yviy");
        stallOrganizationCodeEle.$watch("cValue", (newValue, oldValue) => {
            if (newValue !== oldValue) {
                flag = true;
            } else {
                flag = false;
            }
            resolve(flag);
        });
    });

}


function main() {
    let formPartEle = this.$$element("form_part_h1o69w");
    let pageRenderElement = this.$$root().$parent.$parent.$parent;
    if (formPartEle) {
        formPartEle.$$getRenderElement().onSave()
            .then((res) => {
                if (!res.hasError) {
                    console.log("保存成功");
                    pageRenderElement.goHistory(-1);
                } else {
                    console.log("保存失败");
                }
            })
    }
}
